package com.back.Mapper;

import com.back.Dao.Device;
import com.back.Dao.DeviceData;
import com.back.Dao.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DeviceDataMapper {

    @Select("select * from device_data")
    List<DeviceData> findAllDeice();

    // 查询符合条件的行
    @Select("select * from device_data where device_data.device_id = #{id}")
    List<DeviceData> findDeviceById(Integer id);

    // 删除
    @Delete("delete from device_data where id = #{id}")
    Integer DelDevice(int id);

    //增加
    Integer addDeviceData(DeviceData deviceData);

    //修改
    Integer updateDeviceData(DeviceData deviceData);

}
